import React from 'react';
import { BrowserRouter as Router, Routes, Route, Link } from 'react-router-dom';
import { Layout, Menu } from 'antd';
import DatasetList from './components/DatasetList';
import DatasetCreate from './components/DatasetCreate';
import DatasetDetail from './components/DatasetDetail';
import './App.css';

const { Header, Content, Footer } = Layout;

function App() {
  return (
    <Router>
      <Layout className="layout">
        <Header className="app-header">
          <div className="logo">AI实验室</div>
          <Menu
            theme="dark"
            mode="horizontal"
            defaultSelectedKeys={['1']}
            items={[
              {
                key: '1',
                label: <Link to="/">数据集管理</Link>,
              },
            ]}
          />
        </Header>
        <Content className="app-content">
          <div className="container">
            <Routes>
              <Route path="/" element={<DatasetList />} />
              <Route path="/create" element={<DatasetCreate />} />
              <Route path="/dataset/:id" element={<DatasetDetail />} />
            </Routes>
          </div>
        </Content>
        <Footer className="app-footer">数据集管理系统 ©2024</Footer>
      </Layout>
    </Router>
  );
}

export default App;